package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Member;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface MemberDao {
    public List<Member> findAll(@Param("queryString") String queryString);
    public Page<Member> selectByCondition(@Param("queryString")String queryString);
    public void add(Member member);
    public void deleteById(@Param("id")Integer id);
    public Member findById(@Param("id") Integer id);
    public Member findByTelephone(@Param("phoneNumber") String phoneNumber);
    public void edit(Member member);
    public Integer findMemberCountBeforeDate(@Param("date")String date);
    public Integer findMemberCountByDate(@Param("date")String date);
    public Integer findMemberCountAfterDate(@Param("date")String date);
    public Integer findMemberTotalCount();

    Integer getMemberReport(@Param("month") String month);

    List<Member> getFamily(@Param("id") Integer id);

    Integer getMemberByAge(@Param("start")Integer start,@Param("end")Integer end);

    List<Map> getMemberByGender();

    Integer getMemberByAgeUnKnow();
}
